package cn.zhizihua.exception;

/**
 * 枚举异常信息
 */
public enum AppExceptionCodeMsg {

    INVALID_CODE(10000,"无效的验证码"),
    USERNAME_NOT_EXISTS(10001,"用户名不存在"),
    PASSWORD_ERROR(10002,"密码错误"),
    USERNAME_OR_PASSWORD_ERROR(10003,"用户名或密码错误"),
    PARAMS_EMPTY(10004,"请求参数为空"),
    DELETE_FAIL(20000,"删除失败"),
    UPDATE_FAIL(20002,"更新失败"),
    INSERT_FAIL(20003,"添加失败"),
    SAVE_FAIL(20004,"保存失败"),
    DATA_NOT_FOUND(20001,"对象未找到"),
    SAVE_OR_UPDATE_FAILE(30000,"保存或更新失败"),
    BATCH_DEL_FAILE(30001,"批量删除失败"),
    GET_BY_PAGE_FAILE(30002,"分页搜索失败"),
    GET_ALL_FAILE(30003,"查询全部信息失败")
    ;

    private Integer code;
    private String msg;

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    AppExceptionCodeMsg(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
